//Copyright (c) 2018 Yardi Technology Limited. Http://www.kooboo.com 
//All rights reserved.
using System;

namespace Ude.Core
{
	public abstract class JapaneseContextAnalyser
	{
		protected const int CATEGORIES_NUM = 6;

		protected const int ENOUGH_REL_THRESHOLD = 100;

		protected const int MAX_REL_THRESHOLD = 1000;

		protected const int MINIMUM_DATA_THRESHOLD = 4;

		protected const float DONT_KNOW = -1f;

		protected static byte[,] jp2CharContext = new byte[,]
		{
			{
				0,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1
			},
			{
				2,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				0,
				3,
				4,
				4,
				4,
				2,
				4,
				3,
				3,
				4,
				3,
				2,
				3,
				3,
				4,
				2,
				3,
				3,
				3,
				2,
				4,
				1,
				4,
				3,
				3,
				1,
				5,
				4,
				3,
				4,
				3,
				4,
				3,
				5,
				3,
				0,
				3,
				5,
				4,
				2,
				0,
				3,
				1,
				0,
				3,
				3,
				0,
				3,
				3,
				0,
				1,
				1,
				0,
				4,
				3,
				0,
				3,
				3,
				0,
				4,
				0,
				2,
				0,
				3,
				5,
				5,
				5,
				5,
				4,
				0,
				4,
				1,
				0,
				3,
				4
			},
			{
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2
			},
			{
				0,
				4,
				0,
				5,
				0,
				5,
				0,
				4,
				0,
				4,
				5,
				4,
				4,
				3,
				5,
				3,
				5,
				1,
				5,
				3,
				4,
				3,
				4,
				4,
				3,
				4,
				3,
				3,
				4,
				3,
				5,
				4,
				4,
				3,
				5,
				5,
				3,
				5,
				5,
				5,
				3,
				5,
				5,
				3,
				4,
				5,
				5,
				3,
				1,
				3,
				2,
				0,
				3,
				4,
				0,
				4,
				2,
				0,
				4,
				2,
				1,
				5,
				3,
				2,
				3,
				5,
				0,
				4,
				0,
				2,
				0,
				5,
				4,
				4,
				5,
				4,
				5,
				0,
				4,
				0,
				0,
				4,
				4
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0
			},
			{
				0,
				3,
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				4,
				5,
				4,
				3,
				3,
				3,
				3,
				4,
				3,
				5,
				4,
				4,
				3,
				5,
				4,
				4,
				3,
				4,
				3,
				4,
				4,
				4,
				4,
				5,
				3,
				4,
				4,
				3,
				4,
				5,
				5,
				4,
				5,
				5,
				1,
				4,
				5,
				4,
				3,
				0,
				3,
				3,
				1,
				3,
				3,
				0,
				4,
				4,
				0,
				3,
				3,
				1,
				5,
				3,
				3,
				3,
				5,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				3,
				4,
				3,
				3,
				0,
				4,
				1,
				1,
				3,
				4
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0
			},
			{
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				4,
				0,
				3,
				4,
				4,
				3,
				2,
				2,
				1,
				2,
				1,
				3,
				1,
				3,
				3,
				3,
				3,
				3,
				4,
				3,
				1,
				3,
				3,
				5,
				3,
				3,
				0,
				4,
				3,
				0,
				5,
				4,
				3,
				3,
				5,
				4,
				4,
				3,
				4,
				4,
				5,
				0,
				1,
				2,
				0,
				1,
				2,
				0,
				2,
				2,
				0,
				1,
				0,
				0,
				5,
				2,
				2,
				1,
				4,
				0,
				3,
				0,
				1,
				0,
				4,
				4,
				3,
				5,
				4,
				3,
				0,
				2,
				1,
				0,
				4,
				3
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0
			},
			{
				0,
				3,
				0,
				5,
				0,
				4,
				0,
				2,
				1,
				4,
				4,
				2,
				4,
				1,
				4,
				2,
				4,
				2,
				4,
				3,
				3,
				3,
				4,
				3,
				3,
				3,
				3,
				1,
				4,
				2,
				3,
				3,
				3,
				1,
				4,
				4,
				1,
				1,
				1,
				4,
				3,
				3,
				2,
				0,
				2,
				4,
				3,
				2,
				0,
				3,
				3,
				0,
				3,
				1,
				1,
				0,
				0,
				0,
				3,
				3,
				0,
				4,
				2,
				2,
				3,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				5,
				3,
				4,
				4,
				0,
				3,
				0,
				0,
				1,
				4
			},
			{
				1,
				4,
				0,
				4,
				0,
				4,
				0,
				4,
				0,
				3,
				5,
				4,
				4,
				3,
				4,
				3,
				5,
				4,
				3,
				3,
				4,
				3,
				5,
				4,
				4,
				4,
				4,
				3,
				4,
				2,
				4,
				3,
				3,
				1,
				5,
				4,
				3,
				2,
				4,
				5,
				4,
				5,
				5,
				4,
				4,
				5,
				4,
				4,
				0,
				3,
				2,
				2,
				3,
				3,
				0,
				4,
				3,
				1,
				3,
				2,
				1,
				4,
				3,
				3,
				4,
				5,
				0,
				3,
				0,
				2,
				0,
				4,
				5,
				5,
				4,
				5,
				4,
				0,
				4,
				0,
				0,
				5,
				4
			},
			{
				0,
				5,
				0,
				5,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				3,
				4,
				3,
				3,
				3,
				4,
				0,
				4,
				4,
				4,
				3,
				4,
				3,
				4,
				3,
				3,
				1,
				4,
				2,
				4,
				3,
				4,
				0,
				5,
				4,
				1,
				4,
				5,
				4,
				4,
				5,
				3,
				2,
				4,
				3,
				4,
				3,
				2,
				4,
				1,
				3,
				3,
				3,
				2,
				3,
				2,
				0,
				4,
				3,
				3,
				4,
				3,
				3,
				3,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				5,
				4,
				4,
				4,
				3,
				0,
				4,
				1,
				0,
				1,
				3
			},
			{
				0,
				3,
				1,
				4,
				0,
				3,
				0,
				2,
				0,
				3,
				4,
				4,
				3,
				1,
				4,
				2,
				3,
				3,
				4,
				3,
				4,
				3,
				4,
				3,
				4,
				4,
				3,
				2,
				3,
				1,
				5,
				4,
				4,
				1,
				4,
				4,
				3,
				5,
				4,
				4,
				3,
				5,
				5,
				4,
				3,
				4,
				4,
				3,
				1,
				2,
				3,
				1,
				2,
				2,
				0,
				3,
				2,
				0,
				3,
				1,
				0,
				5,
				3,
				3,
				3,
				4,
				3,
				3,
				3,
				3,
				4,
				4,
				4,
				4,
				5,
				4,
				2,
				0,
				3,
				3,
				2,
				4,
				3
			},
			{
				0,
				2,
				0,
				3,
				0,
				1,
				0,
				1,
				0,
				0,
				3,
				2,
				0,
				0,
				2,
				0,
				1,
				0,
				2,
				1,
				3,
				3,
				3,
				1,
				2,
				3,
				1,
				0,
				1,
				0,
				4,
				2,
				1,
				1,
				3,
				3,
				0,
				4,
				3,
				3,
				1,
				4,
				3,
				3,
				0,
				3,
				3,
				2,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				4,
				1,
				0,
				2,
				3,
				2,
				2,
				2,
				1,
				3,
				3,
				3,
				4,
				4,
				3,
				2,
				0,
				3,
				1,
				0,
				3,
				3
			},
			{
				0,
				4,
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				4,
				4,
				4,
				3,
				3,
				3,
				3,
				3,
				3,
				4,
				3,
				4,
				2,
				4,
				3,
				4,
				3,
				3,
				2,
				4,
				3,
				4,
				5,
				4,
				1,
				4,
				5,
				3,
				5,
				4,
				5,
				3,
				5,
				4,
				0,
				3,
				5,
				5,
				3,
				1,
				3,
				3,
				2,
				2,
				3,
				0,
				3,
				4,
				1,
				3,
				3,
				2,
				4,
				3,
				3,
				3,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				5,
				4,
				4,
				5,
				3,
				0,
				4,
				1,
				0,
				3,
				4
			},
			{
				0,
				2,
				0,
				3,
				0,
				3,
				0,
				0,
				0,
				2,
				2,
				2,
				1,
				0,
				1,
				0,
				0,
				0,
				3,
				0,
				3,
				0,
				3,
				0,
				1,
				3,
				1,
				0,
				3,
				1,
				3,
				3,
				3,
				1,
				3,
				3,
				3,
				0,
				1,
				3,
				1,
				3,
				4,
				0,
				0,
				3,
				1,
				1,
				0,
				3,
				2,
				0,
				0,
				0,
				0,
				1,
				3,
				0,
				1,
				0,
				0,
				3,
				3,
				2,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				3,
				4,
				3,
				4,
				3,
				3,
				0,
				3,
				0,
				0,
				2,
				3
			},
			{
				2,
				3,
				0,
				3,
				0,
				2,
				0,
				1,
				0,
				3,
				3,
				4,
				3,
				1,
				3,
				1,
				1,
				1,
				3,
				1,
				4,
				3,
				4,
				3,
				3,
				3,
				0,
				0,
				3,
				1,
				5,
				4,
				3,
				1,
				4,
				3,
				2,
				5,
				5,
				4,
				4,
				4,
				4,
				3,
				3,
				4,
				4,
				4,
				0,
				2,
				1,
				1,
				3,
				2,
				0,
				1,
				2,
				0,
				0,
				1,
				0,
				4,
				1,
				3,
				3,
				3,
				0,
				3,
				0,
				1,
				0,
				4,
				4,
				4,
				5,
				5,
				3,
				0,
				2,
				0,
				0,
				4,
				4
			},
			{
				0,
				2,
				0,
				1,
				0,
				3,
				1,
				3,
				0,
				2,
				3,
				3,
				3,
				0,
				3,
				1,
				0,
				0,
				3,
				0,
				3,
				2,
				3,
				1,
				3,
				2,
				1,
				1,
				0,
				0,
				4,
				2,
				1,
				0,
				2,
				3,
				1,
				4,
				3,
				2,
				0,
				4,
				4,
				3,
				1,
				3,
				1,
				3,
				0,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				4,
				1,
				1,
				1,
				2,
				0,
				3,
				0,
				0,
				0,
				3,
				4,
				2,
				4,
				3,
				2,
				0,
				1,
				0,
				0,
				3,
				3
			},
			{
				0,
				1,
				0,
				4,
				0,
				5,
				0,
				4,
				0,
				2,
				4,
				4,
				2,
				3,
				3,
				2,
				3,
				3,
				5,
				3,
				3,
				3,
				4,
				3,
				4,
				2,
				3,
				0,
				4,
				3,
				3,
				3,
				4,
				1,
				4,
				3,
				2,
				1,
				5,
				5,
				3,
				4,
				5,
				1,
				3,
				5,
				4,
				2,
				0,
				3,
				3,
				0,
				1,
				3,
				0,
				4,
				2,
				0,
				1,
				3,
				1,
				4,
				3,
				3,
				3,
				3,
				0,
				3,
				0,
				1,
				0,
				3,
				4,
				4,
				4,
				5,
				5,
				0,
				3,
				0,
				1,
				4,
				5
			},
			{
				0,
				2,
				0,
				3,
				0,
				3,
				0,
				0,
				0,
				2,
				3,
				1,
				3,
				0,
				4,
				0,
				1,
				1,
				3,
				0,
				3,
				4,
				3,
				2,
				3,
				1,
				0,
				3,
				3,
				2,
				3,
				1,
				3,
				0,
				2,
				3,
				0,
				2,
				1,
				4,
				1,
				2,
				2,
				0,
				0,
				3,
				3,
				0,
				0,
				2,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				2,
				2,
				0,
				3,
				2,
				1,
				3,
				3,
				0,
				2,
				0,
				2,
				0,
				0,
				3,
				3,
				1,
				2,
				4,
				0,
				3,
				0,
				2,
				2,
				3
			},
			{
				2,
				4,
				0,
				5,
				0,
				4,
				0,
				4,
				0,
				2,
				4,
				4,
				4,
				3,
				4,
				3,
				3,
				3,
				1,
				2,
				4,
				3,
				4,
				3,
				4,
				4,
				5,
				0,
				3,
				3,
				3,
				3,
				2,
				0,
				4,
				3,
				1,
				4,
				3,
				4,
				1,
				4,
				4,
				3,
				3,
				4,
				4,
				3,
				1,
				2,
				3,
				0,
				4,
				2,
				0,
				4,
				1,
				0,
				3,
				3,
				0,
				4,
				3,
				3,
				3,
				4,
				0,
				4,
				0,
				2,
				0,
				3,
				5,
				3,
				4,
				5,
				2,
				0,
				3,
				0,
				0,
				4,
				5
			},
			{
				0,
				3,
				0,
				4,
				0,
				1,
				0,
				1,
				0,
				1,
				3,
				2,
				2,
				1,
				3,
				0,
				3,
				0,
				2,
				0,
				2,
				0,
				3,
				0,
				2,
				0,
				0,
				0,
				1,
				0,
				1,
				1,
				0,
				0,
				3,
				1,
				0,
				0,
				0,
				4,
				0,
				3,
				1,
				0,
				2,
				1,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				4,
				2,
				2,
				3,
				1,
				0,
				3,
				0,
				0,
				0,
				1,
				4,
				4,
				4,
				3,
				0,
				0,
				4,
				0,
				0,
				1,
				4
			},
			{
				1,
				4,
				1,
				5,
				0,
				3,
				0,
				3,
				0,
				4,
				5,
				4,
				4,
				3,
				5,
				3,
				3,
				4,
				4,
				3,
				4,
				1,
				3,
				3,
				3,
				3,
				2,
				1,
				4,
				1,
				5,
				4,
				3,
				1,
				4,
				4,
				3,
				5,
				4,
				4,
				3,
				5,
				4,
				3,
				3,
				4,
				4,
				4,
				0,
				3,
				3,
				1,
				2,
				3,
				0,
				3,
				1,
				0,
				3,
				3,
				0,
				5,
				4,
				4,
				4,
				4,
				4,
				4,
				3,
				3,
				5,
				4,
				4,
				3,
				3,
				5,
				4,
				0,
				3,
				2,
				0,
				4,
				4
			},
			{
				0,
				2,
				0,
				3,
				0,
				1,
				0,
				0,
				0,
				1,
				3,
				3,
				3,
				2,
				4,
				1,
				3,
				0,
				3,
				1,
				3,
				0,
				2,
				2,
				1,
				1,
				0,
				0,
				2,
				0,
				4,
				3,
				1,
				0,
				4,
				3,
				0,
				4,
				4,
				4,
				1,
				4,
				3,
				1,
				1,
				3,
				3,
				1,
				0,
				2,
				0,
				0,
				1,
				3,
				0,
				0,
				0,
				0,
				2,
				0,
				0,
				4,
				3,
				2,
				4,
				3,
				5,
				4,
				3,
				3,
				3,
				4,
				3,
				3,
				4,
				3,
				3,
				0,
				2,
				1,
				0,
				3,
				3
			},
			{
				0,
				2,
				0,
				4,
				0,
				3,
				0,
				2,
				0,
				2,
				5,
				5,
				3,
				4,
				4,
				4,
				4,
				1,
				4,
				3,
				3,
				0,
				4,
				3,
				4,
				3,
				1,
				3,
				3,
				2,
				4,
				3,
				0,
				3,
				4,
				3,
				0,
				3,
				4,
				4,
				2,
				4,
				4,
				0,
				4,
				5,
				3,
				3,
				2,
				2,
				1,
				1,
				1,
				2,
				0,
				1,
				5,
				0,
				3,
				3,
				2,
				4,
				3,
				3,
				3,
				4,
				0,
				3,
				0,
				2,
				0,
				4,
				4,
				3,
				5,
				5,
				0,
				0,
				3,
				0,
				2,
				3,
				3
			},
			{
				0,
				3,
				0,
				4,
				0,
				3,
				0,
				1,
				0,
				3,
				4,
				3,
				3,
				1,
				3,
				3,
				3,
				0,
				3,
				1,
				3,
				0,
				4,
				3,
				3,
				1,
				1,
				0,
				3,
				0,
				3,
				3,
				0,
				0,
				4,
				4,
				0,
				1,
				5,
				4,
				3,
				3,
				5,
				0,
				3,
				3,
				4,
				3,
				0,
				2,
				0,
				1,
				1,
				1,
				0,
				1,
				3,
				0,
				1,
				2,
				1,
				3,
				3,
				2,
				3,
				3,
				0,
				3,
				0,
				1,
				0,
				1,
				3,
				3,
				4,
				4,
				1,
				0,
				1,
				2,
				2,
				1,
				3
			},
			{
				0,
				1,
				0,
				4,
				0,
				4,
				0,
				3,
				0,
				1,
				3,
				3,
				3,
				2,
				3,
				1,
				1,
				0,
				3,
				0,
				3,
				3,
				4,
				3,
				2,
				4,
				2,
				0,
				1,
				0,
				4,
				3,
				2,
				0,
				4,
				3,
				0,
				5,
				3,
				3,
				2,
				4,
				4,
				4,
				3,
				3,
				3,
				4,
				0,
				1,
				3,
				0,
				0,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				4,
				2,
				3,
				3,
				3,
				0,
				3,
				0,
				0,
				0,
				4,
				4,
				4,
				5,
				3,
				2,
				0,
				3,
				3,
				0,
				3,
				5
			},
			{
				0,
				2,
				0,
				3,
				0,
				0,
				0,
				3,
				0,
				1,
				3,
				0,
				2,
				0,
				0,
				0,
				1,
				0,
				3,
				1,
				1,
				3,
				3,
				0,
				0,
				3,
				0,
				0,
				3,
				0,
				2,
				3,
				1,
				0,
				3,
				1,
				0,
				3,
				3,
				2,
				0,
				4,
				2,
				2,
				0,
				2,
				0,
				0,
				0,
				4,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2,
				1,
				2,
				0,
				1,
				0,
				1,
				0,
				0,
				0,
				1,
				3,
				1,
				2,
				0,
				0,
				0,
				1,
				0,
				0,
				1,
				4
			},
			{
				0,
				3,
				0,
				3,
				0,
				5,
				0,
				1,
				0,
				2,
				4,
				3,
				1,
				3,
				3,
				2,
				1,
				1,
				5,
				2,
				1,
				0,
				5,
				1,
				2,
				0,
				0,
				0,
				3,
				3,
				2,
				2,
				3,
				2,
				4,
				3,
				0,
				0,
				3,
				3,
				1,
				3,
				3,
				0,
				2,
				5,
				3,
				4,
				0,
				3,
				3,
				0,
				1,
				2,
				0,
				2,
				2,
				0,
				3,
				2,
				0,
				2,
				2,
				3,
				3,
				3,
				0,
				2,
				0,
				1,
				0,
				3,
				4,
				4,
				2,
				5,
				4,
				0,
				3,
				0,
				0,
				3,
				5
			},
			{
				0,
				3,
				0,
				3,
				0,
				3,
				0,
				1,
				0,
				3,
				3,
				3,
				3,
				0,
				3,
				0,
				2,
				0,
				2,
				1,
				1,
				0,
				2,
				0,
				1,
				0,
				0,
				0,
				2,
				1,
				0,
				0,
				1,
				0,
				3,
				2,
				0,
				0,
				3,
				3,
				1,
				2,
				3,
				1,
				0,
				3,
				3,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				2,
				3,
				1,
				2,
				3,
				0,
				3,
				0,
				1,
				0,
				3,
				2,
				1,
				0,
				4,
				3,
				0,
				1,
				1,
				0,
				3,
				3
			},
			{
				0,
				4,
				0,
				5,
				0,
				3,
				0,
				3,
				0,
				4,
				5,
				5,
				4,
				3,
				5,
				3,
				4,
				3,
				5,
				3,
				3,
				2,
				5,
				3,
				4,
				4,
				4,
				3,
				4,
				3,
				4,
				5,
				5,
				3,
				4,
				4,
				3,
				4,
				4,
				5,
				4,
				4,
				4,
				3,
				4,
				5,
				5,
				4,
				2,
				3,
				4,
				2,
				3,
				4,
				0,
				3,
				3,
				1,
				4,
				3,
				2,
				4,
				3,
				3,
				5,
				5,
				0,
				3,
				0,
				3,
				0,
				5,
				5,
				5,
				5,
				4,
				4,
				0,
				4,
				0,
				1,
				4,
				4
			},
			{
				0,
				4,
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				3,
				5,
				4,
				4,
				2,
				3,
				2,
				5,
				1,
				3,
				2,
				5,
				1,
				4,
				2,
				3,
				2,
				3,
				3,
				4,
				3,
				3,
				3,
				3,
				2,
				5,
				4,
				1,
				3,
				3,
				5,
				3,
				4,
				4,
				0,
				4,
				4,
				3,
				1,
				1,
				3,
				1,
				0,
				2,
				3,
				0,
				2,
				3,
				0,
				3,
				0,
				0,
				4,
				3,
				1,
				3,
				4,
				0,
				3,
				0,
				2,
				0,
				4,
				4,
				4,
				3,
				4,
				5,
				0,
				4,
				0,
				0,
				3,
				4
			},
			{
				0,
				3,
				0,
				3,
				0,
				3,
				1,
				2,
				0,
				3,
				4,
				4,
				3,
				3,
				3,
				0,
				2,
				2,
				4,
				3,
				3,
				1,
				3,
				3,
				3,
				1,
				1,
				0,
				3,
				1,
				4,
				3,
				2,
				3,
				4,
				4,
				2,
				4,
				4,
				4,
				3,
				4,
				4,
				3,
				2,
				4,
				4,
				3,
				1,
				3,
				3,
				1,
				3,
				3,
				0,
				4,
				1,
				0,
				2,
				2,
				1,
				4,
				3,
				2,
				3,
				3,
				5,
				4,
				3,
				3,
				5,
				4,
				4,
				3,
				3,
				0,
				4,
				0,
				3,
				2,
				2,
				4,
				4
			},
			{
				0,
				2,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				1,
				2,
				1,
				3,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				1,
				2,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				3,
				0,
				0,
				1,
				0,
				1,
				1,
				3,
				1,
				0,
				0,
				0,
				1,
				1,
				0,
				1,
				1,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				1,
				2,
				2,
				0,
				3,
				4,
				0,
				0,
				0,
				1,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				1,
				1
			},
			{
				0,
				1,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				4,
				0,
				4,
				1,
				4,
				0,
				3,
				0,
				4,
				0,
				3,
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				4,
				1,
				5,
				1,
				4,
				0,
				0,
				3,
				0,
				5,
				0,
				5,
				2,
				0,
				1,
				0,
				0,
				0,
				2,
				1,
				4,
				0,
				1,
				3,
				0,
				0,
				3,
				0,
				0,
				3,
				1,
				1,
				4,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0
			},
			{
				1,
				4,
				0,
				5,
				0,
				3,
				0,
				2,
				0,
				3,
				5,
				4,
				4,
				3,
				4,
				3,
				5,
				3,
				4,
				3,
				3,
				0,
				4,
				3,
				3,
				3,
				3,
				3,
				3,
				2,
				4,
				4,
				3,
				1,
				3,
				4,
				4,
				5,
				4,
				4,
				3,
				4,
				4,
				1,
				3,
				5,
				4,
				3,
				3,
				3,
				1,
				2,
				2,
				3,
				3,
				1,
				3,
				1,
				3,
				3,
				3,
				5,
				3,
				3,
				4,
				5,
				0,
				3,
				0,
				3,
				0,
				3,
				4,
				3,
				4,
				4,
				3,
				0,
				3,
				0,
				2,
				4,
				3
			},
			{
				0,
				1,
				0,
				4,
				0,
				0,
				0,
				0,
				0,
				1,
				4,
				0,
				4,
				1,
				4,
				2,
				4,
				0,
				3,
				0,
				1,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				3,
				1,
				1,
				1,
				0,
				3,
				0,
				0,
				0,
				1,
				2,
				1,
				0,
				0,
				1,
				1,
				1,
				1,
				0,
				1,
				0,
				0,
				0,
				1,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				3,
				2,
				0,
				2,
				2,
				0,
				1,
				0,
				0,
				0,
				2,
				3,
				2,
				3,
				3,
				0,
				0,
				0,
				0,
				2,
				1,
				0
			},
			{
				0,
				5,
				1,
				5,
				0,
				3,
				0,
				3,
				0,
				5,
				4,
				4,
				5,
				1,
				5,
				3,
				3,
				0,
				4,
				3,
				4,
				3,
				5,
				3,
				4,
				3,
				3,
				2,
				4,
				3,
				4,
				3,
				3,
				0,
				3,
				3,
				1,
				4,
				4,
				3,
				4,
				4,
				4,
				3,
				4,
				5,
				5,
				3,
				2,
				3,
				1,
				1,
				3,
				3,
				1,
				3,
				1,
				1,
				3,
				3,
				2,
				4,
				5,
				3,
				3,
				5,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				3,
				5,
				3,
				3,
				0,
				3,
				4,
				0,
				4,
				3
			},
			{
				0,
				5,
				0,
				5,
				0,
				3,
				0,
				2,
				0,
				4,
				4,
				3,
				5,
				2,
				4,
				3,
				3,
				3,
				4,
				4,
				4,
				3,
				5,
				3,
				5,
				3,
				3,
				1,
				4,
				0,
				4,
				3,
				3,
				0,
				3,
				3,
				0,
				4,
				4,
				4,
				4,
				5,
				4,
				3,
				3,
				5,
				5,
				3,
				2,
				3,
				1,
				2,
				3,
				2,
				0,
				1,
				0,
				0,
				3,
				2,
				2,
				4,
				4,
				3,
				1,
				5,
				0,
				4,
				0,
				3,
				0,
				4,
				3,
				1,
				3,
				2,
				1,
				0,
				3,
				3,
				0,
				3,
				3
			},
			{
				0,
				4,
				0,
				5,
				0,
				5,
				0,
				4,
				0,
				4,
				5,
				5,
				5,
				3,
				4,
				3,
				3,
				2,
				5,
				4,
				4,
				3,
				5,
				3,
				5,
				3,
				4,
				0,
				4,
				3,
				4,
				4,
				3,
				2,
				4,
				4,
				3,
				4,
				5,
				4,
				4,
				5,
				5,
				0,
				3,
				5,
				5,
				4,
				1,
				3,
				3,
				2,
				3,
				3,
				1,
				3,
				1,
				0,
				4,
				3,
				1,
				4,
				4,
				3,
				4,
				5,
				0,
				4,
				0,
				2,
				0,
				4,
				3,
				4,
				4,
				3,
				3,
				0,
				4,
				0,
				0,
				5,
				5
			},
			{
				0,
				4,
				0,
				4,
				0,
				5,
				0,
				1,
				1,
				3,
				3,
				4,
				4,
				3,
				4,
				1,
				3,
				0,
				5,
				1,
				3,
				0,
				3,
				1,
				3,
				1,
				1,
				0,
				3,
				0,
				3,
				3,
				4,
				0,
				4,
				3,
				0,
				4,
				4,
				4,
				3,
				4,
				4,
				0,
				3,
				5,
				4,
				1,
				0,
				3,
				0,
				0,
				2,
				3,
				0,
				3,
				1,
				0,
				3,
				1,
				0,
				3,
				2,
				1,
				3,
				5,
				0,
				3,
				0,
				1,
				0,
				3,
				2,
				3,
				3,
				4,
				4,
				0,
				2,
				2,
				0,
				4,
				4
			},
			{
				2,
				4,
				0,
				5,
				0,
				4,
				0,
				3,
				0,
				4,
				5,
				5,
				4,
				3,
				5,
				3,
				5,
				3,
				5,
				3,
				5,
				2,
				5,
				3,
				4,
				3,
				3,
				4,
				3,
				4,
				5,
				3,
				2,
				1,
				5,
				4,
				3,
				2,
				3,
				4,
				5,
				3,
				4,
				1,
				2,
				5,
				4,
				3,
				0,
				3,
				3,
				0,
				3,
				2,
				0,
				2,
				3,
				0,
				4,
				1,
				0,
				3,
				4,
				3,
				3,
				5,
				0,
				3,
				0,
				1,
				0,
				4,
				5,
				5,
				5,
				4,
				3,
				0,
				4,
				2,
				0,
				3,
				5
			},
			{
				0,
				5,
				0,
				4,
				0,
				4,
				0,
				2,
				0,
				5,
				4,
				3,
				4,
				3,
				4,
				3,
				3,
				3,
				4,
				3,
				4,
				2,
				5,
				3,
				5,
				3,
				4,
				1,
				4,
				3,
				4,
				4,
				4,
				0,
				3,
				5,
				0,
				4,
				4,
				4,
				4,
				5,
				3,
				1,
				3,
				4,
				5,
				3,
				3,
				3,
				3,
				3,
				3,
				3,
				0,
				2,
				2,
				0,
				3,
				3,
				2,
				4,
				3,
				3,
				3,
				5,
				3,
				4,
				1,
				3,
				3,
				5,
				3,
				2,
				0,
				0,
				0,
				0,
				4,
				3,
				1,
				3,
				3
			},
			{
				0,
				1,
				0,
				3,
				0,
				3,
				0,
				1,
				0,
				1,
				3,
				3,
				3,
				2,
				3,
				3,
				3,
				0,
				3,
				0,
				0,
				0,
				3,
				1,
				3,
				0,
				0,
				0,
				2,
				2,
				2,
				3,
				0,
				0,
				3,
				2,
				0,
				1,
				2,
				4,
				1,
				3,
				3,
				0,
				0,
				3,
				3,
				3,
				0,
				1,
				0,
				0,
				2,
				1,
				0,
				0,
				3,
				0,
				3,
				1,
				0,
				3,
				0,
				0,
				1,
				3,
				0,
				2,
				0,
				1,
				0,
				3,
				3,
				1,
				3,
				3,
				0,
				0,
				1,
				1,
				0,
				3,
				3
			},
			{
				0,
				2,
				0,
				3,
				0,
				2,
				1,
				4,
				0,
				2,
				2,
				3,
				1,
				1,
				3,
				1,
				1,
				0,
				2,
				0,
				3,
				1,
				2,
				3,
				1,
				3,
				0,
				0,
				1,
				0,
				4,
				3,
				2,
				3,
				3,
				3,
				1,
				4,
				2,
				3,
				3,
				3,
				3,
				1,
				0,
				3,
				1,
				4,
				0,
				1,
				1,
				0,
				1,
				2,
				0,
				1,
				1,
				0,
				1,
				1,
				0,
				3,
				1,
				3,
				2,
				2,
				0,
				1,
				0,
				0,
				0,
				2,
				3,
				3,
				3,
				1,
				0,
				0,
				0,
				0,
				0,
				2,
				3
			},
			{
				0,
				5,
				0,
				4,
				0,
				5,
				0,
				2,
				0,
				4,
				5,
				5,
				3,
				3,
				4,
				3,
				3,
				1,
				5,
				4,
				4,
				2,
				4,
				4,
				4,
				3,
				4,
				2,
				4,
				3,
				5,
				5,
				4,
				3,
				3,
				4,
				3,
				3,
				5,
				5,
				4,
				5,
				5,
				1,
				3,
				4,
				5,
				3,
				1,
				4,
				3,
				1,
				3,
				3,
				0,
				3,
				3,
				1,
				4,
				3,
				1,
				4,
				5,
				3,
				3,
				5,
				0,
				4,
				0,
				3,
				0,
				5,
				3,
				3,
				1,
				4,
				3,
				0,
				4,
				0,
				1,
				5,
				3
			},
			{
				0,
				5,
				0,
				5,
				0,
				4,
				0,
				2,
				0,
				4,
				4,
				3,
				4,
				3,
				3,
				3,
				3,
				3,
				5,
				4,
				4,
				4,
				4,
				4,
				4,
				5,
				3,
				3,
				5,
				2,
				4,
				4,
				4,
				3,
				4,
				4,
				3,
				3,
				4,
				4,
				5,
				5,
				3,
				3,
				4,
				3,
				4,
				3,
				3,
				4,
				3,
				3,
				3,
				3,
				1,
				2,
				2,
				1,
				4,
				3,
				3,
				5,
				4,
				4,
				3,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				4,
				4,
				4,
				1,
				0,
				4,
				2,
				0,
				2,
				4
			},
			{
				0,
				4,
				0,
				4,
				0,
				3,
				0,
				1,
				0,
				3,
				5,
				2,
				3,
				0,
				3,
				0,
				2,
				1,
				4,
				2,
				3,
				3,
				4,
				1,
				4,
				3,
				3,
				2,
				4,
				1,
				3,
				3,
				3,
				0,
				3,
				3,
				0,
				0,
				3,
				3,
				3,
				5,
				3,
				3,
				3,
				3,
				3,
				2,
				0,
				2,
				0,
				0,
				2,
				0,
				0,
				2,
				0,
				0,
				1,
				0,
				0,
				3,
				1,
				2,
				2,
				3,
				0,
				3,
				0,
				2,
				0,
				4,
				4,
				3,
				3,
				4,
				1,
				0,
				3,
				0,
				0,
				2,
				4
			},
			{
				0,
				0,
				0,
				4,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				1,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				2,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				3,
				1,
				3,
				0,
				3,
				2,
				0,
				0,
				0,
				1,
				0,
				3,
				2,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				4,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				0,
				2
			},
			{
				0,
				2,
				1,
				3,
				0,
				2,
				0,
				2,
				0,
				3,
				3,
				3,
				3,
				1,
				3,
				1,
				3,
				3,
				3,
				3,
				3,
				3,
				4,
				2,
				2,
				1,
				2,
				1,
				4,
				0,
				4,
				3,
				1,
				3,
				3,
				3,
				2,
				4,
				3,
				5,
				4,
				3,
				3,
				3,
				3,
				3,
				3,
				3,
				0,
				1,
				3,
				0,
				2,
				0,
				0,
				1,
				0,
				0,
				1,
				0,
				0,
				4,
				2,
				0,
				2,
				3,
				0,
				3,
				3,
				0,
				3,
				3,
				4,
				2,
				3,
				1,
				4,
				0,
				1,
				2,
				0,
				2,
				3
			},
			{
				0,
				3,
				0,
				3,
				0,
				1,
				0,
				3,
				0,
				2,
				3,
				3,
				3,
				0,
				3,
				1,
				2,
				0,
				3,
				3,
				2,
				3,
				3,
				2,
				3,
				2,
				3,
				1,
				3,
				0,
				4,
				3,
				2,
				0,
				3,
				3,
				1,
				4,
				3,
				3,
				2,
				3,
				4,
				3,
				1,
				3,
				3,
				1,
				1,
				0,
				1,
				1,
				0,
				1,
				0,
				1,
				0,
				1,
				0,
				0,
				0,
				4,
				1,
				1,
				0,
				3,
				0,
				3,
				1,
				0,
				2,
				3,
				3,
				3,
				3,
				3,
				1,
				0,
				0,
				2,
				0,
				3,
				3
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				2,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				3,
				0,
				3,
				1,
				0,
				1,
				0,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				2,
				0,
				2,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3
			},
			{
				0,
				2,
				0,
				3,
				1,
				3,
				0,
				3,
				0,
				2,
				3,
				3,
				3,
				1,
				3,
				1,
				3,
				1,
				3,
				1,
				3,
				3,
				3,
				1,
				3,
				0,
				2,
				3,
				1,
				1,
				4,
				3,
				3,
				2,
				3,
				3,
				1,
				2,
				2,
				4,
				1,
				3,
				3,
				0,
				1,
				4,
				2,
				3,
				0,
				1,
				3,
				0,
				3,
				0,
				0,
				1,
				3,
				0,
				2,
				0,
				0,
				3,
				3,
				2,
				1,
				3,
				0,
				3,
				0,
				2,
				0,
				3,
				4,
				4,
				4,
				3,
				1,
				0,
				3,
				0,
				0,
				3,
				3
			},
			{
				0,
				2,
				0,
				1,
				0,
				2,
				0,
				0,
				0,
				1,
				3,
				2,
				2,
				1,
				3,
				0,
				1,
				1,
				3,
				0,
				3,
				2,
				3,
				1,
				2,
				0,
				2,
				0,
				1,
				1,
				3,
				3,
				3,
				0,
				3,
				3,
				1,
				1,
				2,
				3,
				2,
				3,
				3,
				1,
				2,
				3,
				2,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				1,
				0,
				0,
				2,
				1,
				2,
				1,
				3,
				0,
				3,
				0,
				0,
				0,
				3,
				4,
				4,
				4,
				3,
				2,
				0,
				2,
				0,
				0,
				2,
				4
			},
			{
				0,
				0,
				0,
				1,
				0,
				1,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				1,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2,
				2,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				1,
				3,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3
			},
			{
				0,
				3,
				0,
				3,
				0,
				2,
				0,
				3,
				0,
				3,
				3,
				3,
				2,
				3,
				2,
				2,
				2,
				0,
				3,
				1,
				3,
				3,
				3,
				2,
				3,
				3,
				0,
				0,
				3,
				0,
				3,
				2,
				2,
				0,
				2,
				3,
				1,
				4,
				3,
				4,
				3,
				3,
				2,
				3,
				1,
				5,
				4,
				4,
				0,
				3,
				1,
				2,
				1,
				3,
				0,
				3,
				1,
				1,
				2,
				0,
				2,
				3,
				1,
				3,
				1,
				3,
				0,
				3,
				0,
				1,
				0,
				3,
				3,
				4,
				4,
				2,
				1,
				0,
				2,
				1,
				0,
				2,
				4
			},
			{
				0,
				1,
				0,
				3,
				0,
				1,
				0,
				2,
				0,
				1,
				4,
				2,
				5,
				1,
				4,
				0,
				2,
				0,
				2,
				1,
				3,
				1,
				4,
				0,
				2,
				1,
				0,
				0,
				2,
				1,
				4,
				1,
				1,
				0,
				3,
				3,
				0,
				5,
				1,
				3,
				2,
				3,
				3,
				1,
				0,
				3,
				2,
				3,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				4,
				0,
				1,
				0,
				3,
				0,
				2,
				0,
				1,
				0,
				3,
				3,
				3,
				4,
				3,
				3,
				0,
				0,
				0,
				0,
				2,
				3
			},
			{
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				3
			},
			{
				0,
				1,
				0,
				3,
				0,
				4,
				0,
				3,
				0,
				2,
				4,
				3,
				1,
				0,
				3,
				2,
				2,
				1,
				3,
				1,
				2,
				2,
				3,
				1,
				1,
				1,
				2,
				1,
				3,
				0,
				1,
				2,
				0,
				1,
				3,
				2,
				1,
				3,
				0,
				5,
				5,
				1,
				0,
				0,
				1,
				3,
				2,
				1,
				0,
				3,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				3,
				4,
				0,
				1,
				1,
				1,
				3,
				2,
				0,
				2,
				0,
				1,
				0,
				2,
				3,
				3,
				1,
				2,
				3,
				0,
				1,
				0,
				1,
				0,
				4
			},
			{
				0,
				0,
				0,
				1,
				0,
				3,
				0,
				3,
				0,
				2,
				2,
				1,
				0,
				0,
				4,
				0,
				3,
				0,
				3,
				1,
				3,
				0,
				3,
				0,
				3,
				0,
				1,
				0,
				3,
				0,
				3,
				1,
				3,
				0,
				3,
				3,
				0,
				0,
				1,
				2,
				1,
				1,
				1,
				0,
				1,
				2,
				0,
				0,
				0,
				1,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2,
				2,
				1,
				2,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				2,
				3,
				3,
				3,
				3,
				0,
				0,
				0,
				0,
				1,
				4
			},
			{
				0,
				0,
				0,
				3,
				0,
				3,
				0,
				0,
				0,
				0,
				3,
				1,
				1,
				0,
				3,
				0,
				1,
				0,
				2,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				3,
				0,
				2,
				0,
				2,
				3,
				0,
				0,
				2,
				2,
				3,
				1,
				2,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				0,
				2,
				0,
				0,
				0,
				0,
				2,
				3
			},
			{
				2,
				4,
				0,
				5,
				0,
				5,
				0,
				4,
				0,
				3,
				4,
				3,
				3,
				3,
				4,
				3,
				3,
				3,
				4,
				3,
				4,
				4,
				5,
				4,
				5,
				5,
				5,
				2,
				3,
				0,
				5,
				5,
				4,
				1,
				5,
				4,
				3,
				1,
				5,
				4,
				3,
				4,
				4,
				3,
				3,
				4,
				3,
				3,
				0,
				3,
				2,
				0,
				2,
				3,
				0,
				3,
				0,
				0,
				3,
				3,
				0,
				5,
				3,
				2,
				3,
				3,
				0,
				3,
				0,
				3,
				0,
				3,
				4,
				5,
				4,
				5,
				3,
				0,
				4,
				3,
				0,
				3,
				4
			},
			{
				0,
				3,
				0,
				3,
				0,
				3,
				0,
				3,
				0,
				3,
				3,
				4,
				3,
				2,
				3,
				2,
				3,
				0,
				4,
				3,
				3,
				3,
				3,
				3,
				3,
				3,
				3,
				0,
				3,
				2,
				4,
				3,
				3,
				1,
				3,
				4,
				3,
				4,
				4,
				4,
				3,
				4,
				4,
				3,
				2,
				4,
				4,
				1,
				0,
				2,
				0,
				0,
				1,
				1,
				0,
				2,
				0,
				0,
				3,
				1,
				0,
				5,
				3,
				2,
				1,
				3,
				0,
				3,
				0,
				1,
				2,
				4,
				3,
				2,
				4,
				3,
				3,
				0,
				3,
				2,
				0,
				4,
				4
			},
			{
				0,
				3,
				0,
				3,
				0,
				1,
				0,
				0,
				0,
				1,
				4,
				3,
				3,
				2,
				3,
				1,
				3,
				1,
				4,
				2,
				3,
				2,
				4,
				2,
				3,
				4,
				3,
				0,
				2,
				2,
				3,
				3,
				3,
				0,
				3,
				3,
				3,
				0,
				3,
				4,
				1,
				3,
				3,
				0,
				3,
				4,
				3,
				3,
				0,
				1,
				1,
				0,
				1,
				0,
				0,
				0,
				4,
				0,
				3,
				0,
				0,
				3,
				1,
				2,
				1,
				3,
				0,
				4,
				0,
				1,
				0,
				4,
				3,
				3,
				4,
				3,
				3,
				0,
				2,
				0,
				0,
				3,
				3
			},
			{
				0,
				3,
				0,
				4,
				0,
				1,
				0,
				3,
				0,
				3,
				4,
				3,
				3,
				0,
				3,
				3,
				3,
				1,
				3,
				1,
				3,
				3,
				4,
				3,
				3,
				3,
				0,
				0,
				3,
				1,
				5,
				3,
				3,
				1,
				3,
				3,
				2,
				5,
				4,
				3,
				3,
				4,
				5,
				3,
				2,
				5,
				3,
				4,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				0,
				1,
				1,
				0,
				4,
				2,
				2,
				1,
				3,
				0,
				3,
				0,
				2,
				0,
				4,
				4,
				3,
				5,
				3,
				2,
				0,
				1,
				1,
				0,
				3,
				4
			},
			{
				0,
				5,
				0,
				4,
				0,
				5,
				0,
				2,
				0,
				4,
				4,
				3,
				3,
				2,
				3,
				3,
				3,
				1,
				4,
				3,
				4,
				1,
				5,
				3,
				4,
				3,
				4,
				0,
				4,
				2,
				4,
				3,
				4,
				1,
				5,
				4,
				0,
				4,
				4,
				4,
				4,
				5,
				4,
				1,
				3,
				5,
				4,
				2,
				1,
				4,
				1,
				1,
				3,
				2,
				0,
				3,
				1,
				0,
				3,
				2,
				1,
				4,
				3,
				3,
				3,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				4,
				3,
				3,
				3,
				0,
				4,
				2,
				0,
				3,
				4
			},
			{
				1,
				4,
				0,
				4,
				0,
				3,
				0,
				1,
				0,
				3,
				3,
				3,
				1,
				1,
				3,
				3,
				2,
				2,
				3,
				3,
				1,
				0,
				3,
				2,
				2,
				1,
				2,
				0,
				3,
				1,
				2,
				1,
				2,
				0,
				3,
				2,
				0,
				2,
				2,
				3,
				3,
				4,
				3,
				0,
				3,
				3,
				1,
				2,
				0,
				1,
				1,
				3,
				1,
				2,
				0,
				0,
				3,
				0,
				1,
				1,
				0,
				3,
				2,
				2,
				3,
				3,
				0,
				3,
				0,
				0,
				0,
				2,
				3,
				3,
				4,
				3,
				3,
				0,
				1,
				0,
				0,
				1,
				4
			},
			{
				0,
				4,
				0,
				4,
				0,
				4,
				0,
				0,
				0,
				3,
				4,
				4,
				3,
				1,
				4,
				2,
				3,
				2,
				3,
				3,
				3,
				1,
				4,
				3,
				4,
				0,
				3,
				0,
				4,
				2,
				3,
				3,
				2,
				2,
				5,
				4,
				2,
				1,
				3,
				4,
				3,
				4,
				3,
				1,
				3,
				3,
				4,
				2,
				0,
				2,
				1,
				0,
				3,
				3,
				0,
				0,
				2,
				0,
				3,
				1,
				0,
				4,
				4,
				3,
				4,
				3,
				0,
				4,
				0,
				1,
				0,
				2,
				4,
				4,
				4,
				4,
				4,
				0,
				3,
				2,
				0,
				3,
				3
			},
			{
				0,
				0,
				0,
				1,
				0,
				4,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				1,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				3,
				2,
				0,
				0,
				1,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				2
			},
			{
				0,
				2,
				0,
				3,
				0,
				4,
				0,
				4,
				0,
				1,
				3,
				3,
				3,
				0,
				4,
				0,
				2,
				1,
				2,
				1,
				1,
				1,
				2,
				0,
				3,
				1,
				1,
				0,
				1,
				0,
				3,
				1,
				0,
				0,
				3,
				3,
				2,
				0,
				1,
				1,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				2,
				0,
				2,
				2,
				0,
				3,
				1,
				0,
				0,
				1,
				0,
				1,
				1,
				0,
				1,
				2,
				0,
				3,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				3,
				3,
				4,
				3,
				1,
				0,
				1,
				0,
				3,
				0,
				2
			},
			{
				0,
				0,
				0,
				3,
				0,
				5,
				0,
				0,
				0,
				0,
				1,
				0,
				2,
				0,
				3,
				1,
				0,
				1,
				3,
				0,
				0,
				0,
				2,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				1,
				1,
				0,
				0,
				4,
				0,
				0,
				0,
				2,
				3,
				0,
				1,
				4,
				1,
				0,
				2,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				3
			},
			{
				0,
				2,
				0,
				5,
				0,
				5,
				0,
				1,
				0,
				2,
				4,
				3,
				3,
				2,
				5,
				1,
				3,
				2,
				3,
				3,
				3,
				0,
				4,
				1,
				2,
				0,
				3,
				0,
				4,
				0,
				2,
				2,
				1,
				1,
				5,
				3,
				0,
				0,
				1,
				4,
				2,
				3,
				2,
				0,
				3,
				3,
				3,
				2,
				0,
				2,
				4,
				1,
				1,
				2,
				0,
				1,
				1,
				0,
				3,
				1,
				0,
				1,
				3,
				1,
				2,
				3,
				0,
				2,
				0,
				0,
				0,
				1,
				3,
				5,
				4,
				4,
				4,
				0,
				3,
				0,
				0,
				1,
				3
			},
			{
				0,
				4,
				0,
				5,
				0,
				4,
				0,
				4,
				0,
				4,
				5,
				4,
				3,
				3,
				4,
				3,
				3,
				3,
				4,
				3,
				4,
				4,
				5,
				3,
				4,
				5,
				4,
				2,
				4,
				2,
				3,
				4,
				3,
				1,
				4,
				4,
				1,
				3,
				5,
				4,
				4,
				5,
				5,
				4,
				4,
				5,
				5,
				5,
				2,
				3,
				3,
				1,
				4,
				3,
				1,
				3,
				3,
				0,
				3,
				3,
				1,
				4,
				3,
				4,
				4,
				4,
				0,
				3,
				0,
				4,
				0,
				3,
				3,
				4,
				4,
				5,
				0,
				0,
				4,
				3,
				0,
				4,
				5
			},
			{
				0,
				4,
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				3,
				4,
				4,
				4,
				3,
				3,
				2,
				4,
				3,
				4,
				3,
				4,
				3,
				5,
				3,
				4,
				3,
				2,
				1,
				4,
				2,
				4,
				4,
				3,
				1,
				3,
				4,
				2,
				4,
				5,
				5,
				3,
				4,
				5,
				4,
				1,
				5,
				4,
				3,
				0,
				3,
				2,
				2,
				3,
				2,
				1,
				3,
				1,
				0,
				3,
				3,
				3,
				5,
				3,
				3,
				3,
				5,
				4,
				4,
				2,
				3,
				3,
				4,
				3,
				3,
				3,
				2,
				1,
				0,
				3,
				2,
				1,
				4,
				3
			},
			{
				0,
				4,
				0,
				5,
				0,
				4,
				0,
				3,
				0,
				3,
				5,
				5,
				3,
				2,
				4,
				3,
				4,
				0,
				5,
				4,
				4,
				1,
				4,
				4,
				4,
				3,
				3,
				3,
				4,
				3,
				5,
				5,
				2,
				3,
				3,
				4,
				1,
				2,
				5,
				5,
				3,
				5,
				5,
				2,
				3,
				5,
				5,
				4,
				0,
				3,
				2,
				0,
				3,
				3,
				1,
				1,
				5,
				1,
				4,
				1,
				0,
				4,
				3,
				2,
				3,
				5,
				0,
				4,
				0,
				3,
				0,
				5,
				4,
				3,
				4,
				3,
				0,
				0,
				4,
				1,
				0,
				4,
				4
			},
			{
				1,
				3,
				0,
				4,
				0,
				2,
				0,
				2,
				0,
				2,
				5,
				5,
				3,
				3,
				3,
				3,
				3,
				0,
				4,
				2,
				3,
				4,
				4,
				4,
				3,
				4,
				0,
				0,
				3,
				4,
				5,
				4,
				3,
				3,
				3,
				3,
				2,
				5,
				5,
				4,
				5,
				5,
				5,
				4,
				3,
				5,
				5,
				5,
				1,
				3,
				1,
				0,
				1,
				0,
				0,
				3,
				2,
				0,
				4,
				2,
				0,
				5,
				2,
				3,
				2,
				4,
				1,
				3,
				0,
				3,
				0,
				4,
				5,
				4,
				5,
				4,
				3,
				0,
				4,
				2,
				0,
				5,
				4
			},
			{
				0,
				3,
				0,
				4,
				0,
				5,
				0,
				3,
				0,
				3,
				4,
				4,
				3,
				2,
				3,
				2,
				3,
				3,
				3,
				3,
				3,
				2,
				4,
				3,
				3,
				2,
				2,
				0,
				3,
				3,
				3,
				3,
				3,
				1,
				3,
				3,
				3,
				0,
				4,
				4,
				3,
				4,
				4,
				1,
				1,
				4,
				4,
				2,
				0,
				3,
				1,
				0,
				1,
				1,
				0,
				4,
				1,
				0,
				2,
				3,
				1,
				3,
				3,
				1,
				3,
				4,
				0,
				3,
				0,
				1,
				0,
				3,
				1,
				3,
				0,
				0,
				1,
				0,
				2,
				0,
				0,
				4,
				4
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0
			},
			{
				0,
				3,
				0,
				3,
				0,
				2,
				0,
				3,
				0,
				1,
				5,
				4,
				3,
				3,
				3,
				1,
				4,
				2,
				1,
				2,
				3,
				4,
				4,
				2,
				4,
				4,
				5,
				0,
				3,
				1,
				4,
				3,
				4,
				0,
				4,
				3,
				3,
				3,
				2,
				3,
				2,
				5,
				3,
				4,
				3,
				2,
				2,
				3,
				0,
				0,
				3,
				0,
				2,
				1,
				0,
				1,
				2,
				0,
				0,
				0,
				0,
				2,
				1,
				1,
				3,
				1,
				0,
				2,
				0,
				4,
				0,
				3,
				4,
				4,
				4,
				5,
				2,
				0,
				2,
				0,
				0,
				1,
				3
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				1,
				1,
				1,
				0,
				0,
				1,
				1,
				0,
				0,
				0,
				4,
				2,
				1,
				1,
				0,
				1,
				0,
				3,
				2,
				0,
				0,
				3,
				1,
				1,
				1,
				2,
				2,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				3,
				0,
				1,
				0,
				0,
				0,
				2,
				0,
				0,
				0,
				1,
				4,
				0,
				4,
				2,
				1,
				0,
				0,
				0,
				0,
				0,
				1
			},
			{
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				1,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				1,
				0,
				0,
				0,
				0,
				3,
				1,
				0,
				0,
				0,
				2,
				0,
				2,
				1,
				0,
				0,
				1,
				2,
				1,
				0,
				1,
				1,
				0,
				0,
				3,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				1,
				3,
				1,
				0,
				0,
				0,
				0,
				0,
				1,
				0,
				0,
				2,
				1,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				0,
				2
			},
			{
				0,
				4,
				0,
				4,
				0,
				4,
				0,
				3,
				0,
				4,
				4,
				3,
				4,
				2,
				4,
				3,
				2,
				0,
				4,
				4,
				4,
				3,
				5,
				3,
				5,
				3,
				3,
				2,
				4,
				2,
				4,
				3,
				4,
				3,
				1,
				4,
				0,
				2,
				3,
				4,
				4,
				4,
				3,
				3,
				3,
				4,
				4,
				4,
				3,
				4,
				1,
				3,
				4,
				3,
				2,
				1,
				2,
				1,
				3,
				3,
				3,
				4,
				4,
				3,
				3,
				5,
				0,
				4,
				0,
				3,
				0,
				4,
				3,
				3,
				3,
				2,
				1,
				0,
				3,
				0,
				0,
				3,
				3
			},
			{
				0,
				4,
				0,
				3,
				0,
				3,
				0,
				3,
				0,
				3,
				5,
				5,
				3,
				3,
				3,
				3,
				4,
				3,
				4,
				3,
				3,
				3,
				4,
				4,
				4,
				3,
				3,
				3,
				3,
				4,
				3,
				5,
				3,
				3,
				1,
				3,
				2,
				4,
				5,
				5,
				5,
				5,
				4,
				3,
				4,
				5,
				5,
				3,
				2,
				2,
				3,
				3,
				3,
				3,
				2,
				3,
				3,
				1,
				2,
				3,
				2,
				4,
				3,
				3,
				3,
				4,
				0,
				4,
				0,
				2,
				0,
				4,
				3,
				2,
				2,
				1,
				2,
				0,
				3,
				0,
				0,
				4,
				1
			}
		};

		private int[] relSample = new int[6];

		private int totalRel;

		private int lastCharOrder;

		private int needToSkipCharNum;

		private bool done;

		public JapaneseContextAnalyser()
		{
			this.Reset();
		}

		public float GetConfidence()
		{
			if (this.totalRel > 4)
			{
				return (float)(checked(this.totalRel - this.relSample[0])) / (float)this.totalRel;
			}
			return -1f;
		}

		public void HandleData(byte[] buf, int offset, int len)
		{
			int num = 0;
			checked
			{
				int num2 = offset + len;
				if (this.done)
				{
					return;
				}
				int i = this.needToSkipCharNum + offset;
				while (i < num2)
				{
					int order = this.GetOrder(buf, i, out num);
					i += num;
					if (i > num2)
					{
						this.needToSkipCharNum = i - num2;
						this.lastCharOrder = -1;
					}
					else
					{
						if (order != -1 && this.lastCharOrder != -1)
						{
							this.totalRel++;
							if (this.totalRel > 1000)
							{
								this.done = true;
								return;
							}
							this.relSample[(int)JapaneseContextAnalyser.jp2CharContext[this.lastCharOrder, order]]++;
						}
						this.lastCharOrder = order;
					}
				}
			}
		}

		public void HandleOneChar(byte[] buf, int offset, int charLen)
		{
			if (this.totalRel > 1000)
			{
				this.done = true;
			}
			if (this.done)
			{
				return;
			}
			int num = (charLen == 2) ? this.GetOrder(buf, offset) : -1;
			checked
			{
				if (num != -1 && this.lastCharOrder != -1)
				{
					this.totalRel++;
					this.relSample[(int)JapaneseContextAnalyser.jp2CharContext[this.lastCharOrder, num]]++;
				}
				this.lastCharOrder = num;
			}
		}

		public void Reset()
		{
			this.totalRel = 0;
			checked
			{
				for (int i = 0; i < 6; i++)
				{
					this.relSample[i] = 0;
					this.needToSkipCharNum = 0;
					this.lastCharOrder = -1;
					this.done = false;
				}
			}
		}

		protected abstract int GetOrder(byte[] buf, int offset, out int charLen);

		protected abstract int GetOrder(byte[] buf, int offset);

		public bool GotEnoughData()
		{
			return this.totalRel > 100;
		}
	}
}
